package com.superteam.zzl.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.ScrollView;

import com.superteam.zzl.activity.MainActivity;
import com.superteam.zzl.utils.NavigationAnimationUtils;

/**
 * Created by zhang on 2017/1/11.
 */

public class RecommandScrollView extends ScrollView {
    public RecommandScrollView(Context context) {
        this(context,null,0);
    }

    public RecommandScrollView(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public RecommandScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
        super.onScrollChanged(l, t, oldl, oldt);
        //Log.e("wangly", "onScrollChanged");
//        if (oldt < t && ((t - oldt) > 65)) {// 向上
//            MainActivity.amb.rg.setVisibility(View.GONE);
//            MainActivity.amb.rg.setAnimation(NavigationAnimationUtils.moveToViewBottom());
//
//        }  else if (oldt > t && (oldt - t) > 65) {// 向下
//            if(MainActivity.amb.rg.getVisibility()==GONE) {
//                MainActivity.amb.rg.setVisibility(View.VISIBLE);
//                MainActivity.amb.rg.setAnimation(NavigationAnimationUtils.moveToViewLocation());
//            }
//
//        }

    }
}
